var mouse = { x: 0, y: 0 };

document.onmousemove = function( ev ) {
	mouse.x = ev.layerX;
	mouse.y = ev.layerY;
};